<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>系统首页</title>
<!-- 下载并引入jquery easyUI -->
<link rel="stylesheet" type="text/css"
	href="../libs/jquery-easyui-1.9.5/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="../libs/jquery-easyui-1.9.5/themes/icon.css">
<link rel="stylesheet" type="text/css"
	href="../libs/jquery-easyui-1.9.5/themes/color.css">
<script type="text/javascript"
	src="../libs/jquery-easyui-1.9.5/jquery.min.js"></script>
<script type="text/javascript"
	src="../libs/jquery-easyui-1.9.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../libs/context-menu.js"></script>
<!-- 安装cookie插件 -->
<script type="text/javascript" src="../libs/jquery-easyui-1.9.5/plugins/jquery.cookie.min.js"></script>


<style type="text/css">
.top {
	height: 80px;
	border-bottom: 1px #95b8e7 solid;
	background-image: url(../images/top.jpg);
}

.button-tools {
	float: right;
	margin-right: 10px;
	margin-top: 40px;
}

.exit-system {
	float: right;
	margin-left: 20px;
}

/* 修复tinymce在easyui页面图形弹框被遮住问题 */
.tox-tinymce-aux  {
	z-index: 13000 !important;
}
</style>

</head>
<body class="easyui-layout">
	<script type="text/javascript">
		if (window.top != window.self) {
			window.top.location = "../index.html";
		}
	</script>

	<div id="cc" class="easyui-layout"
		style="width: 100%; heith: 100%; min-height: 600px;"
		data-options="fit:true">


		<div data-options="region:'north',border:false"
			style="overflow: hidden; height: 80px;">
			<div class="top">
				<div class="button-tools">
					<div class="exit-system">
						<a id="exitSystem" target="_top" class="easyui-linkbutton"
							href="../user/logout" data-options="iconCls:'icon-no'">安全退出</a>
					</div>
					<div class="exit-system">
						<a id="modifyPassSystem" onclick="updatepass()"
							class="easyui-linkbutton"
							data-options="iconCls:'icon-large-clipart'">修改密码</a>
					</div>
					<div class="exit-system">
						<div class="curUserInfo">
							当前登录用户：<span id="loginuser"></span>
						</div>
					</div>
				</div>
			</div>
		</div>


		<div data-options="region:'west',title:'管理菜单',split:true"
			style="width: 200px;">
			<div id="aa" class="easyui-accordion"
				data-options="fit:true,border:false">

				<div title="基础管理" data-options="iconCls:'icon-save',selected:true"
					style="overflow: auto; padding: 10px;">

					<a id="btn" href="javascript:void(0);" class="easyui-linkbutton"
						data-options="plain:true,"
						onclick="open_menu('用户管理','../pages/users/list.html')">用户管理</a><br>

					<a id="btn" href="javascript:void(0);" class="easyui-linkbutton"
						data-options="plain:true"
						onclick="open_menu('角色管理','../pages/role/list.html')">角色管理</a>
				</div>

				<div title="系统管理" data-options="iconCls:'icon-reload'"
					style="padding: 10px;">
					<a href="javascript:void(0);" class="easyui-linkbutton"
						data-options="plain:true" onclick="updatepass()">修改密码</a> <br>
					<a href="../user/logout" class="easyui-linkbutton"
						data-options="plain:true">退出系统</a>
				</div>

			</div>
		</div>

		<div data-options="region:'center',border:false,plain:true">
			<div id="tt" class="easyui-tabs"
				data-options="fit:true,tools:'#tab-tools'">
				<div title="首页" style="text-align: center; font-size: 24px;">
					<p>欢迎来到XXX管理后台管理系统</p>
				</div>
			</div>
		</div>

		<div id="tab-tools">
			<a href="javascript:void(0)" class="easyui-linkbutton"
				data-options="plain:true,iconCls:'icon-reload'" onclick="reload()"></a>
			<a href="javascript:void(0)" class="easyui-linkbutton"
				data-options="plain:true,iconCls:'icon-delete'" onclick="closecur()"></a>
		</div>

		<div id="mm" class="easyui-menu" style="width: 150px;">
			<div data-options="iconCls:'icon-reload'" id="refresh">刷新</div>
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-delete0'" id="closecur">关闭当前</div>
			<div data-options="iconCls:'icon-delete0'" id="closeall">全部关闭</div>
			<div data-options="iconCls:'icon-delete0'" id="closeother">除此之外全部关闭</div>
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-delete0'" id="closeright">当前页右侧全部关闭</div>
			<div data-options="iconCls:'icon-delete0'" id="closeleft">当前页左侧全部关闭</div>
		</div>


		<div data-options="region:'south',border:false,plain:true"
			style="height: 40px; text-align: center; font-size: 12px;">
			<p>版权所有,&copy;2016-2018</p>
		</div>
	</div>


	<div id="win" class="easyui-window" title="修改密码"
		style="width: 400px; height: 260px;" closed="true"
		data-options="collapsible:false,minimizable:false,resizable:false,maximizable:false"
		buttons="#updatepass_dlg-buttons">
		<form style="padding: 10px 20px 10px 40px;">
			<p>
				旧密码: <input name="opassword" style="width: 260px;"
					class="easyui-passwordbox " prompt="请输入旧密码" required="true">
			</p>
			<p>
				新密码: <input name="npassword" style="width: 260px;"
					class="easyui-passwordbox " prompt="请输入新密码" required="true">
			</p>
			<div id="updatepass_dlg-buttons"
				style="text-align: center; margin-top: 50px;">
				<a href="#" class="easyui-linkbutton" iconCls="icon-ok"
					onclick="saveUsers()">保存</a> <a href="#" class="easyui-linkbutton"
					iconCls="icon-cancel" style="margin-left: 50px;"
					onclick="javascript:$('#win').dialog('close')">取消</a>
			</div>
		</form>
	</div>



	<script type="text/javascript">
		function open_menu(titleName, menuUrl) {
			if ($("#tt").tabs("exists", titleName)) {
				$("#tt").tabs("select", titleName);
			} else {
				$('#tt').tabs('add', {
					title : titleName,
					href : menuUrl,
					closable : true
				});
			}
		}

		$(function() {
			bindContextMenu('#tt');
			//使用cookie插件读取cookie
			var user = $.cookie("COOKIE_USER");
			//修改dom,把cookie显示到对应网页位置
			$("#loginuser").text(user);
		});

		function updatepass() {
			$('#win').window('open');
		}
	</script>

</body>
</html>